package com.dup.algms;

import com.dup.factory.MatchAlgmsFactory;
import com.dup.interfaces.MatchEx;

public class PerfectMatchEx implements MatchEx {

	@Override
	public boolean machWithWord(String oldStr, String newStr) {
		if (newStr == oldStr) {
			MatchAlgmsFactory.setMsg("Identical Match");
		} else if (newStr.equals(oldStr)) {
			MatchAlgmsFactory.setMsg("Content Match");
		} else {
			MatchAlgmsFactory.setMsg("");
			return false;
		}
		return true;
	}
}
